<?php 

if($_POST){
	$username = !empty($_POST['username']) ? $_POST['username'] : false ;

	$userData = include './user.php';

	foreach ($userData as $value) {
		if(in_array($username, $value)){
			$user = $value; 
		}
	}

	if(isset($user)){
		$arr = array(
			'error'=>'1',
			'msg'=>'用户难度正确',
		);
		echo json_encode($arr);
	}else{
		$arr = array(
			'error'=>'0',
			'msg'=>'用户不存在',
		);
		echo json_encode($arr);

	}

}







 ?>